home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / amos / AMOSList0993.lzh / AMOSLIST / 000028_amos-request@svcs1.digex.net_Mon Sep 6 18:57:09 1993.msg < prev    next >
Internet Message Format  |  1993-10-03  |  2KB

  1. Received: from nextsun.INS.CWRU.Edu by access.digex.net with SMTP id AA01859
  2.   (5.65c/IDA-1.4.4 for <mcox@access.digex.com>); Mon, 6 Sep 1993 18:57:08 -0400
  3. Received: from svcs1.digex.net by nextsun.INS.CWRU.Edu with SMTP (5.65b+ida+/CWRU-1.5.2-freenet-gw)
  4.     id AA03709; Mon, 6 Sep 93 18:55:43 -0400 (from amos-request@svcs1.digex.net for mcox@access.digex.com)
  5. Received: by svcs1.digex.net id AA19785
  6.   (5.65c/IDA-1.4.4 for amos-list-out); Mon, 6 Sep 1993 18:23:07 -0400
  7. Received: from access.digex.net by svcs1.digex.net with SMTP id AA19781
  8.   (5.65c/IDA-1.4.4 for <amos-list@svcs1.digex.net>); Mon, 6 Sep 1993 18:23:05 -0400
  9. Received: from vax.mbhs.edu by access.digex.net with SMTP id AA29357
  10.   (5.65c/IDA-1.4.4 for <amos-list@access.digex.net>); Mon, 6 Sep 1993 18:23:02 -0400
  11. Message-Id: <199309062223.AA29357@access.digex.net>
  12. Date: 6 Sep 93 18:13:00 EST
  13. From: "Andrew Church" <95ACHURCH@vax.mbhs.edu>
  14. Subject: Re: Compiler and disc problems
  15. To: "amos-list" <amos-list@access.digex.net>
  16. Status: RO
  17.  
  18. >>  If he only saves the variables he absolutely needs to, the
  19. >> save time would be cut down by a lot.  Even if he hasn't optimized his
  20. >> variables (bit-packing and such), he shouldn't need more than 1k or so.
  21. >
  22. >        Optimizing variables, bit-packing? I haven't heard of these
  23. >techniques, so could someone please tell me more?
  24.  
  25.   What I meant is, to take an example from my role-playing game:  I have
  26. 128 boolean flags that indicate progress or the occurrence of certain
  27. events.  Instead of creating an integer array of 128 values, one for each
  28. flag, I put them all into a 4-integer array, one bit per flag, thereby saving
  29. myself 496 bytes.  Or, if you have a lot of variables that are all in the
  30. range 0 to 255, use a memory bank or a string to store them instead of a bunch
  31. of integer variables or an integer array.  In other words,
  32.  
  33. ARRAY(55)=120
  34.  
  35. becomes
  36.  
  37. Poke ARRAYSTART+55,120
  38.  
  39. or
  40.  
  41. Poke Varptr(ARRAY$)+55,120
  42.  
  43. where ARRAYSTART is the start of a bank that has one byte per variable, and
  44. ARRAY$ is initialized as "ARRAY$=Space$(NUM_VARS)".
  45.  
  46. >        Also, thanks for all the replies to my previous message about
  47. >compiler end disc problems. They helped a lot!
  48.  
  49.   You're quite welcome.
  50.  
  51.   --Andy Church
  52.